<?php

/**
 * Created by PhpStorm.
 * User: 王溪
 * Date: 2019/3/27
 * Time: 22:05
 */
namespace app\index\validate;
use think\Validate;

class Index extends Validate
{
    //规则
    protected $rule =   [
        'name'  => 'require|max:25',
        'age'   => 'number|between:1,120',
        'email' => 'email',
    ];

    //错误信息
    protected $message  =   [
        'name.require' => '名称必须',
        'name.max'     => '名称最多不能超过25个字符',
        'age.number'   => '老子就是要这么命名',
        'age.between'  => '年龄只能在1-120之间',
        'email'        => '邮箱格式错误',
    ];


}